package com.taotao.sys.ftl;


import com.taotao.common.auth.AuthRequired;
import com.taotao.common.auth.UserInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;


@Controller
@RequestMapping("/")
public class LoginPageController {




    @GetMapping(value = "/login")
    public ModelAndView login()  {

        return new ModelAndView("login");
    }


    @AuthRequired
    @GetMapping(value = "/index")
    public ModelAndView index(UserInfo userInfo)  {

        ModelAndView mav = new ModelAndView("index");

        mav.addObject("userInfo",userInfo);

        return mav;
    }




}
